use super::hitls_pki_cert::HITLS_X509_Cert;
use super::hitls_pki_types::HITLS_PKI_LibCtx;
use crate::bsl::bsl_list::BslList;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _HITLS_X509_StoreCtx {
    _unused: [u8; 0],
}
pub type HITLS_X509_StoreCtx = _HITLS_X509_StoreCtx;
pub type X509_STORECTX_VerifyCb =
    ::std::option::Option<unsafe extern "C" fn(arg1: i32, arg2: *mut HITLS_X509_StoreCtx) -> i32>;
unsafe extern "C" {
    pub fn HITLS_X509_StoreCtxNew() -> *mut HITLS_X509_StoreCtx;
}
unsafe extern "C" {
    pub fn HITLS_X509_ProviderStoreCtxNew(
        libCtx: *mut HITLS_PKI_LibCtx,
        attrName: *const ::std::os::raw::c_char,
    ) -> *mut HITLS_X509_StoreCtx;
}
unsafe extern "C" {
    pub fn HITLS_X509_StoreCtxFree(storeCtx: *mut HITLS_X509_StoreCtx);
}
unsafe extern "C" {
    pub fn HITLS_X509_StoreCtxCtrl(
        storeCtx: *mut HITLS_X509_StoreCtx,
        cmd: i32,
        val: *mut ::std::os::raw::c_void,
        valLen: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CertVerify(storeCtx: *mut HITLS_X509_StoreCtx, chain: *mut BslList) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_CertChainBuild(
        storeCtx: *mut HITLS_X509_StoreCtx,
        isWithRoot: bool,
        cert: *mut HITLS_X509_Cert,
        chain: *mut *mut BslList,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_X509_VerifyHostname(
        cert: *mut HITLS_X509_Cert,
        flags: u32,
        hostname: *const ::std::os::raw::c_char,
        hostnameLen: u32,
    ) -> i32;
}
